const router = require('koa-router')() //引入路由函数
const contractControl = require('../controller/contract') //引入逻辑
/**
 * @swagger
 * definitions:
 *   createGroup:
 *     properties:
 *       name:
 *         type: string
 *       description:
 *         type: string
 */
/**
 * @swagger
 * definitions:
 *   inviteToGroup:
 *     properties:
 *       userId:
 *         type: string
 *       groupId:
 *         type: string

 */

router.post('/contract/createContract',contractControl.createContract)
router.post('/group/inviteToGroup',contractControl.inviteToGroup)
router.post('/contract/getAllContracts',contractControl.getAllContracts)
router.post('/group/getGroupUsers',contractControl.getGroupUsers)
router.post('/group/allocateGroupAuth',contractControl.allocateGroupAuth)
router.post('/group/deleteUser',contractControl.deleteUser)
router.post('/group/updateGroup',contractControl.updateGroup)
router.post('/group/transferGroup',contractControl.transferGroup)
router.post('/group/dissolution',contractControl.dissolutionGroup)
router.get('/group/getAuth/:groupId',contractControl.getAuth)

module.exports = router
